<?php
/**
 * 供app调用用信息
 * http://baseAddress/api/app/
 * @author Kenn
 * @todo 未做
 */
namespace App\Http\Controllers\Api\App;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\User\User;

class UserController extends Controller
{


    /**
     *
     * 第三方App映射的用户信息
     *
     * @param Integer $uid 用户UID
     * @return json
     *
     */
    public function InfoAction($uid)
    {
        $data = array();
        
        $resCode = 200;


        if (intval($uid)) {

            // 查找活动详情
            $data = User::find($uid);
            
            $data = array('data' => $data,'code'=>$resCode);
        } else {
            $resCode = 300;
            
            $data = array('data' => $data,'code'=>$resCode);
        }

        return $this->respondJson($data, $resCode);
    }

    /**
     *
     * 用户中奖列表
     *
     * @param Integer $uid 用户UID
     * @return json
     *
     */
    public function AwardsAction($uid)
    {
        $data = array();
        
        $resCode = 200;


        if (intval($uid)) {

            // 查找活动详情

            $data = array('data' => array(),'code'=>$resCode);
        } else {
            $resCode = 300;
            
            $data = array('data' => array(),'code'=>$resCode);
        }

        return $this->respondJson($data, $resCode);
    }
}
